package com.pd.backend.web.controller.logistics;


import com.pd.backend.common.R;
import com.pd.backend.domain.pojo.Agency;
import com.pd.backend.service.logistics.AgencyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 机构控制层
 */
@RestController
@RequestMapping("/logistics/agency")
public class AgencyController {

    @Autowired
    private AgencyService agencyService;

    @GetMapping("/tree")
    public R<List<Agency>>  tree(){
        return agencyService.getTree();
    }
}
